#include "process.h"
#include <time.h>

#define ALLSZ (1024.00)

void Download()
{
	double newsz = 0;

	while (ALLSZ > newsz)
	{
		double sz = rand() % 50;
		newsz += sz;
		if (newsz > ALLSZ)
		{
			newsz = ALLSZ;
		}
		FlashProcess(ALLSZ, newsz);
		Sleep(100);
	}

	printf("\ndownload %.2lfMB Done\n", newsz);



}

int main()
{
	srand(time(0));
	Download();
	Download();
	Download();
	Download();
	return 0;
}